<%
options_id = "options#{singlebug.defect_id}"
release_form_id = "releaseUpdateForm#{singlebug.defect_id}"
@bug  = singlebug
%>


<div class="bugContainer" id="bugContainer_<%= h singlebug.defect_id%>">

  <div class="bugImage" style="display:none">
    <%
       bug_emoticon = bug_feeling(singlebug)
       if bug_emoticon
    %>       
        <img src="images/icons/onebit_<%= bug_feeling(singlebug) %>.png" alt="">

    <% end %>
  </div>
  
  <div class="topContainer">
    <div class="bugId"><%= h singlebug.defect_id %></div>
    <div class="bugPriority"><%= h singlebug.priority %></div>
  </div>


  <div id="centerContainer<%= h singlebug.defect_id %>" class="centerContainer" >

    <div class="bugIndex" >
      # <%= h singlebug_counter + 1 %>
    </div>

    <div class="<%= h singlebug.status.gsub(/[ ]/, '_').gsub(/[,!]/, '').downcase %>">
      <div id="bugReleaseNumber<%=  h singlebug.defect_id %>" class="bugReleaseNumber"><%= h singlebug.release.release_number if singlebug.release  %></div>
      <div class="bugStatus ">
        <span><%= h singlebug.status %></span>
      </div>
      <div class="bugSummary">
        <%= h singlebug.summary %>
      </div>

    </div>
  </div>

  <div class="bottomContainer">
    <div class="bugDeveloper" style="width: 30%">
      <%= h singlebug.developer.nickname if singlebug.developer %>
    </div>

    <div class="bugActions">
      <%= link_to 'Update Details', edit_bug_path(singlebug) %>
    </div>

    <div id="changeReleaseDiv<%= h singlebug.defect_id %>" style="padding-left: 10px; float:right;">
      <% if !singlebug.release then %>
        <%= link_to_remote "Assign release", :url  => {:controller => :bugs, :action => :edit_release, :id => singlebug}, :update => release_form_id, :method => :get %>
      <% end %>
    </div>

  </div>

  <div id="<%= h release_form_id %>"></div>

</div>
